import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
import _createClass from "@babel/runtime/helpers/esm/createClass";
import _inherits from "@babel/runtime/helpers/esm/inherits";
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
var _excluded = ["label", "children", "className"];

/**
 * Item.js
 * @date 2018/11/23
 */
import React from 'react';
import styles from "../index.less?modules";

var Item = /*#__PURE__*/function (_React$Component) {
  _inherits(Item, _React$Component);

  var _super = _createSuper(Item);

  function Item() {
    _classCallCheck(this, Item);

    return _super.apply(this, arguments);
  }

  _createClass(Item, [{
    key: "render",
    value: function render() {
      var _this$props = this.props,
          label = _this$props.label,
          children = _this$props.children,
          className = _this$props.className,
          other = _objectWithoutProperties(_this$props, _excluded);

      var itemClassName = styles.item;

      if (className) {
        itemClassName += " ".concat(className);
      }

      return /*#__PURE__*/React.createElement("div", Object.assign({
        className: itemClassName
      }, other), /*#__PURE__*/React.createElement("span", {
        className: styles['item-label']
      }, label), /*#__PURE__*/React.createElement("span", {
        className: styles['item-content']
      }, children));
    }
  }]);

  return Item;
}(React.Component);

export { Item as default };